/**
 *@auther: tang
 *@Date: 2021-03-01
 *Project: p2p-finance-manage-system
 */
import * as api from "../api";
export async function dictList() {
  const data = {};
  data["debitTypeList"] = (await api.dict.debitTypeList()).data.data.row;
  data["repaymentMethods"] = (await api.dict.repaymentMethods()).data.data.row;
  data["fundsUsages"] = (await api.dict.fundsUsages()).data.data.row;
  data["riskLevels"] = (await api.dict.riskLevels()).data.data.row;
  data["guaranteeList"] = (await api.dict.guaranteeList()).data.data.row;
  data["loanUserList"] = (await api.dict.loanUserList()).data.data.row;
  data["pledgeList"] = (await api.dict.pledgeTypeList()).data.data.row;
  data["stateList"] = (await api.dict.stateList()).data.data.row;
  return data;
}
export async function upHoldDict() {
  const data = {};
  data["labelList"] = (await api.dict.labelList()).data.data.row;
  data["labelTypeList"] = (await api.dict.labelTypeList()).data.data.row;
  data["addMoneyList"] = (await api.dict.addMoneyList()).data.data.row;
  return data;
}
export function getNowTime() {
  let date = new Date();
  console.log(
    date.getFullYear() +
      "-" +
      (date.getMonth() + 1) +
      "-" +
      date.getDate() +
      " " +
      date.getHours() +
      ":" +
      date.getMinutes() +
      ":" +
      date.getSeconds()
  );
  return date;
}
